/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package DTO;

/**
 *
 * @author quangphuc
 */
public class CGiaBan extends CTao{
    public CGiaBan(){
        this.gb_khtt = 0.0;
        this.gb_khvip = 0.0;
        this.gb_khvl = 0.0;
        this.giaNhap =0.0;
    }
    private long san_phamId;
    public void setSanPhamId(long sp_id){
        this.san_phamId = sp_id;
    }
    public long getSanPhamId(){
        return this.san_phamId;
    }
    private double gb_khvip;
    public void setGiaBanVip(Double gbvip){
        this.gb_khvip = gbvip;
    }
    public Double getGiaBanVip(){
        return this.gb_khvip;
    }
    
    private double gb_khtt;
    public void setGiaBanKHTT(Double gb_khtt){
        this.gb_khtt = gb_khtt;
    }
    public Double getGiaBanKHTT(){
        return this.gb_khtt;
    }
    
    private double gb_khvl;
    public void setGiaBanKHVL(Double gb_khvl){
        this.gb_khvl = gb_khvl;
    }
    public Double getGiaBanKHVL(){
        return this.gb_khvl;
    }
    private String ten_san_pham;
    public void setTenSanPham(String tensanpham){
        this.ten_san_pham = tensanpham;
    }  
    public String getTenSanPham(){
        return this.ten_san_pham;
    }
    private double giaNhap;
    public void setGiaNhap(Double gianhap){
        this.giaNhap = gianhap;
    }
    
    public Double getGiaNhap(){
        return this.giaNhap;
    }
    
    public String toString(){
        StringBuilder sBuilder = new StringBuilder();
        sBuilder.append("{");
        sBuilder.append(String.format("\"%s\" :\" %s \"",CFields.id,this.getId() ));
        sBuilder.append(",");
        sBuilder.append(String.format("\"%s\" :\" %s \"",CFields.gia_nhap,this.getGiaNhap()));        
        sBuilder.append(",");
        sBuilder.append(String.format("\"%s\" :\" %s \"",CFields.gia_ban_khvl,this.getGiaBanKHVL()));        
        sBuilder.append("}");
        return sBuilder.toString();
    }
}
